<?php

/**
* @current cmsmessages.php
* @author   LiuYang <liu_yang@haibao.com>
* @date 2017年2月9日 上午10:35:22
*/
namespace haibao\jiepai\model\data\messages;

class CmsMessages extends \haibao\jiepai\model\data\Base{

    /**
     * 1，评论文章   2，回复评论  3，点赞文章  4，点赞评论 5，管理通知
     */
    const TYPE_ARTICLE = 1;
    const TYPE_REPLY = 2;
    const TYPE_PRAISE_ARTICLE = 3;
    const TYPE_PRAISE_COMMENT = 4;
    const TYPE_MESSAGE = 5;
    const TYPE_COMMENT_PICTURE_MESSAGE = 7;
    const TYPE_REPLY_PICTURE_MESSAGE = 8;
    const TYPE_PRAISE_PICTURE_MESSAGE = 9;

    public $UserID;

    public $VisitorID;

    /**
     * 消息来源用户
     */
    public $FromUserID;
    
    public $TypeID;
    
    public $Type;

    public $IsRead;
    
    public $CreateTime;
    
    public $Flag;
    
    public function __construct(){
        parent::__construct();

        $this->setColumnName('Id', 'MessageID');
        
        $this->intField('UserID', 'UserID');
        $this->intField('VisitorID', 'VisitorID');
        $this->intField('FromUserID', 'FromUserID');
        $this->intField('TypeID', 'TypeID');
        $this->intField('Type', 'Type');
        $this->intField('IsRead', 'IsRead');
        $this->dateField('CreateTime', 'CreateTime');
        $this->intField('Flag', 'Flag');
        
        $this->setTableName('cms_messages');
    }
}
